<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #wrap{
            width: 200px;
            height: 200px;
            border: 1px solid;
            position: absolute;
            left:0;
            right:0;
            top:0;
            bottom:0;
            margin: auto;

            display: flex;
            /*控制主轴是哪一个 以及主轴的方向*/
            /*控制侧轴是哪一个 以及侧轴的方向*/
            /*项目永远排列在正方向上*/
            /*flex-direction: row;*/
            /*flex-wrap:wrap-reverse ;*/
            flex-flow:column-reverse wrap-reverse;
        }
        #wrap div{
            width: 50px;
            height: 50px;
            text-align: center;
            line-height: 50px;
            background: pink;
            color: white;
            border: 1px solid black;
            box-sizing: border-box;
        }
    </style>
</head>
<body>
    <!--容器-->
    <div id="wrap">
        <!--项目-->
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
    </div>
</body>
</html>